<input id="msg" />
<button id="send">Send</button>
<?php echo $this->Html->scriptStart(array('inline' => false)) ?>
	$('#send').click(function(){
		$.ajax({
			'url': '<?php echo $this->Html->url(array('controller' => 'notifications', 'action' => 'write')) ?>',
			'type': 'POST',
			'data': {'msg': $('#msg').val()},
		});
	});
<?php echo $this->Html->scriptEnd() ?>